#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import sys


if __name__ == "__main__":
    try:
        pid = sys.argv[1]
        drargs = " ".join(sys.argv[2:])

        env = "DR_RTCFG=" + "/tmp/.rtcfg." + pid
        os.system("%s dr %s" % (env, drargs))
        os.system("kill -12 %s" % pid)
    except:
        print("Usage: sigdr.py <pid> <dr args>")
